package com.example.foobar.utils;

import java.text.NumberFormat;

public class Utils {
    public static String formateRate(int a, int b){
        if(b <= 0){
            return "/";
        }
        double rate = (double)a/b;
        NumberFormat nt = NumberFormat.getPercentInstance();
        nt.setMinimumFractionDigits(2);
        return nt.format(rate);
    }
}
